<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<rich:panel header="#{messages['doc.control.update.title']}">
	<h:panelGrid ><h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText></h:panelGrid>
	
	<t:panelGrid columns="2">
		<h:outputText></h:outputText>
		<h:panelGroup>
		  	<h:outputText value="*" styleClass="standardText_Mandatory" /> 
			<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
		</h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="prefix" styleClass="error"></t:message>
	
	    <h:panelGroup>
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="prefix" value="#{messages['doc.control.prefix.label']}" styleClass="standardText_Label" />
	    </h:panelGroup>
	    <h:panelGroup>
	    	<t:inputText id="prefix" required="true" size="10" maxlength="10" styleClass="standardText" value="#{docControlBean.docControl.prefix}"></t:inputText>
	    </h:panelGroup>
	    
	    <h:outputText></h:outputText>
		<t:message for="size" styleClass="error"></t:message>
	    
		<h:panelGroup>
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="size" value="#{messages['doc.control.size.label']}" styleClass="standardText_Label" />
	    </h:panelGroup>
	    <h:panelGroup>
	    	<t:inputText id="size" required="true" size="5" maxlength="5" styleClass="standardText" value="#{docControlBean.docControl.size}"></t:inputText>
	    </h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="start" styleClass="error"></t:message>
		<h:panelGroup>
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="start" value="#{messages['doc.control.start.label']}" styleClass="standardText_Label" />
	    </h:panelGroup>
	    <h:panelGroup>
	    	<t:inputText id="start" required="true" size="5" maxlength="5" styleClass="standardText" value="#{docControlBean.docControl.start}"></t:inputText>
	    </h:panelGroup>
	    
	    <h:outputText></h:outputText>
		<t:message for="counter" styleClass="error"></t:message>
		<h:panelGroup>
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="counter" value="#{messages['doc.control.counter.label']}" styleClass="standardText_Label" />
	    </h:panelGroup>
	    <h:panelGroup>
	    	<t:inputText id="counter" required="true" size="5" maxlength="5" styleClass="standardText" value="#{docControlBean.docControl.number}"></t:inputText>
	    </h:panelGroup>
	    
	    <h:outputText></h:outputText>
		<t:message for="type" styleClass="error"></t:message>
		<h:panelGroup>
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="type" value="#{messages['doc.control.type.label']}" styleClass="standardText_Label" />
	    </h:panelGroup>
	    <h:panelGroup>
	    	<t:selectOneMenu id="type" required="true" value="#{docControlBean.docControl.type}" styleClass="standardText" >
				<f:selectItem  itemLabel="#{messages['please.select']}" itemValue=""/>
				<f:selectItems value="#{docControlBean.docTypeSelectList}"/>
			</t:selectOneMenu>
	    </h:panelGroup>
	    
		<h:panelGroup></h:panelGroup>
		<h:panelGroup></h:panelGroup>
		
		<h:panelGroup></h:panelGroup>
		
		<t:panelGroup>
		   <t:panelGrid columns="2">
		   		<h:commandButton value="#{messages['update']}" styleClass="button" action="#{docControlBean.updateAction}" actionListener="#{docControlBean.updateActionEvent}"></h:commandButton>
			    <h:commandButton value="#{messages['back']}" styleClass="button" action="#{docControlBean.backToListAction}" immediate="true"></h:commandButton>
		   </t:panelGrid>
		</t:panelGroup>
	</t:panelGrid>

</rich:panel>
